package com.corpgovernment.organization.mapper;

import com.corpgovernment.organization.common.mybatis.TkMapper;
import com.corpgovernment.organization.entity.db.MbPostInfo;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.util.List;

/**
 * @author wangyujue
 */
@Repository
public interface MbPostMapper extends TkMapper<MbPostInfo> {

    int deleteById(@Param("id") Long id);

    List<MbPostInfo> findByName(@Param("name") String name);

    List<MbPostInfo> findByCode(@Param("code") String code);

    List<MbPostInfo> findByNameList(@Param("nameList") List<String> nameList,@Param("orgId") String orgId);


    MbPostInfo findByNameAndOrgId(@Param("name") String name, @Param("orgId") String orgId);

    MbPostInfo findByCodeAndOrgId(@Param("code") String code, @Param("orgId") String orgId);

    int deleteByOrgIds(@Param("orgIds") List<String> orgIds);

	List<MbPostInfo> selectByPostIds(@Param("ids") List<Long> ids);

    List<MbPostInfo> findByLikeName(@Param("orgId") String orgId,@Param("name") String name);

    int deleteByOrgIdAndName(@Param("nameList")List<String> nameList, @Param("orgId")String orgId);

}
